home *** CD-ROM | disk | FTP | other *** search
- Path: solon.com!not-for-mail
- From: stanr@tiac.net (Stan Ryckman)
- Newsgroups: comp.lang.c,comp.lang.c.moderated,hp.unix,comp.sys.hp.apps,comp.sys.hp.hpux
- Subject: Re: C coding problem
- Date: 16 Mar 1996 09:23:01 -0600
- Organization: Amber & Sneakers Fan Club
- Sender: clc@solutions.solon.com
- Approved: clc@solutions.solon.com
- Message-ID: <4iemcl$a05@solutions.solon.com>
- References: <4ianbf$h86@solutions.solon.com>
- NNTP-Posting-Host: solutions.solon.com
-
- In article <4ianbf$h86@solutions.solon.com>,
- Stephen Proctor <proctor@corp.hp.com> wrote:
-
- [snip]
-
- >for (ii=1; ii<argc; ii++) {
- >/* skip lines */
- >/* The next line is the offending line */
- > if (*argv[ii] == '-') option_val = read_options;
-
- Ugh! If I were going to mix operators that way I'd use parens.
-
- Why not just write
- if (argv[ii][0] == '-') ...
- and then you won't have to worry what "*argv[ii]" is?
-
- Cheers,
- Stan.
- --
- Stan Ryckman (stanr@tiac.net)
- (Apologies for non-responses or late responses to some posts;
- .newsrc was trashed and I'm trying to get it back to where it was.)
-